import fetch from '@/common/utils/http'

/* 获取服务号 */
export const getServeNo = (data?: any) =>
  fetch({
    url: '/call/web/call/action/config/number/service',
    method: 'GET',
    params: data || {}
  })

/* 编辑服务号 */
export const updateServeNo = (data?: any) =>
  fetch({
    url: '/call/web/call/action/config/number/service',
    method: 'PUT',
    data
  })

/* 获取语音导航 */
export const getIvrNavData = (data: any) =>
  fetch({
    url: '/call/action/general/query',
    method: 'POST',
    data
  })

/* 获取外显号 */
export const getExplicitNo = (data?: any) =>
  fetch({
    url: '/call/web/call/action/config/number/display',
    method: 'GET',
    params: data || {}
  })

/* 编辑外显号 */
export const updateExplicitNo = (data: any) =>
  fetch({
    url: '/call/web/call/action/config/number/display',
    method: 'PUT',
    data
  })

/* 获取呼转号 */
export const getCallTranferNo = (data?: any) =>
  fetch({
    url: '/call/web/call/action/config/number',
    method: 'GET',
    params: data || {}
  })

/* 获取sip号 */
export const getSIPNo = (data: any) =>
  fetch({
    url: '/call/web/config/sip/query',
    method: 'POST',
    data
  })

/* 删除sip号 */
export const deleteSIPNo = (data: any) =>
  fetch({
    url: '/call/web/config/sip/del',
    method: 'POST',
    data
  })

/* 新建sip号 */
export const addSIPNo = (data: any) =>
  fetch({
    url: '/call/web/config/sip/add',
    method: 'POST',
    data
  })

/* 编辑sip号 */
export const updateSIPNo = (data: any) =>
  fetch({
    url: '/call/web/config/sip/update',
    method: 'POST',
    data
  })
